package com.dsg.dao.apply;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsg.entity.apply.DsgApplyCar;
import com.dsg.entity.dto.RejectCarDto;
import com.dsg.entity.dto.ReturnCardRecordDto;
import com.dsg.util.BaseDao;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 車輛資料 Mapper 接口
 * </p>
 *
 * @author system
 * @since 2020-07-04
 */
@Repository
public interface DsgApplyCarMapper extends BaseDao<DsgApplyCar> {
    Page<RejectCarDto> selectRejectCar(Page<RejectCarDto> page, DsgApplyCar en);

    List<DsgApplyCar> selectCar(String cusNo);

    void removeAddress(String carOid);

    List<DsgApplyCar> selectCarListByBill(String billOid);

    int deleteCarAndOther(String oid);

    DsgApplyCar detail(String id);

    /**
     * 查询车辆与油咭资料
     *
     * @param dsgApplyCar
     * @return
     */
    List<DsgApplyCar> selectDsgApplyCarAndCard(@Param("en") DsgApplyCar dsgApplyCar);

    /**
     * Check車牌列表
     *
     * @param dsgApplyCar
     * @return
     */
    List<DsgApplyCar> selectDsgApplyCarList(Page<DsgApplyCar> page, @Param("en") DsgApplyCar dsgApplyCar);

    List<DsgApplyCar> selectDsgApplyCarList(@Param("en") DsgApplyCar dsgApplyCar);

    /**
     * 返咭記錄列表（分页）
     * @param page
     * @param returnCardRecordDto
     * @return
     */
    List<ReturnCardRecordDto> selectReturnCardList(Page<ReturnCardRecordDto> page, @Param("en") ReturnCardRecordDto returnCardRecordDto);
}
